package com.cy.pj.common.util;

import com.cy.pj.common.pojo.SysUser;
import org.apache.shiro.SecurityUtils;

public class ShiroUtils {
    public static String getUsername() {
        return getUser().getUsername();
    }
    public static SysUser getUser() {
        return (SysUser)
                SecurityUtils.getSubject().getPrincipal();
    }
}

